<?php


namespace App\Domain\Role\Requests;




use Illuminate\Foundation\Http\FormRequest;

class RoleListPost extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'roleName' => 'present|string|nullable',
//            'level' => 'present|required_if:orgId|in:1,2,3,4,5',
            'ifHas' => 'required|in:1,2',//所有下级（1.包含，2不包含）
            'currentPage' => 'required|integer|min:1|nullable',
            'pageSize' => 'required|integer|min:1|nullable',
        ];
    }

    public function messages()
    {
        return [
        ];
    }
}

